1. Technical Field
The present invention relates generally to computing systems, and more particularly, to a method and system that generate a high-level trace file that can be modified and/or re-executed without requiring re-compilation.
2. Description of the Related Art
Certain operating and debugging processes in computer systems require repetitive and time-consuming debugging tasks that are exacerbated by the need to make minor changes and recompile executable program code. In particular, when hardware changes are made or complex new systems or processors are operated for the first time, the process of adapting existing software to the altered or new system typically requires multiple attempts at first startup, in which the startup sequence and software are often modified slightly to accommodate the hardware changes. Further, end users debugging startup of a system may not have access to the source code and compiler tools to make such changes.
Typically, each software change requires generation of new executable code after the modification is made. Such software is typically modular and includes a large number of pre-scripted operations that call application programming interfaces (APIs). However, even if individual modules that are unchanged can be linked from an unchanged object file, the compilation of altered modules and subsequent linking of the entire executable is a time-consuming operation.
One alternative to re-building an executable file during debugging is direct entry of the high-level procedure calls. However, such modification must be repeated each time it is needed, and does not provide a permanent record of the code changes that are needed. For example, if a particular procedure call needs to be skipped for a new processor, rather than rebuilding an executable file that controls commands sent to a program or processor that controls the startup sequence, a person who has the source code for the executable file may manually enter the sequence of procedure calls made by the executable file if a console is provided to accept them. After verifying that the modified sequence is correct, the program code must still be modified and re-built, or the tedious process of manually entering the startup sequence must be repeated on each startup.
The alternative is to modify and re-build the program code at each detection of a problem with the sequence, which can also be a tedious process, in particular if the first modification(s) are not correct. Another solution possible on some systems is to edit the machine code directly and save the modified machine code, but machine code is not readily comprehended and in particular, machine code generated by high-level compilers, such as highly-optimized machine code, is particularly hard to decipher. Further, machine code that calls high-level procedures gives no clue as to what steps the program code is performing, if there is no reference back to the high-level program source embedded in the executable file.
Therefore, it would be desirable to provide a method and system an alternative to re-building an executable file to make on-the-fly changes during debugging or entering an entire sequence of commands from a command line interface, thereby providing a machine-repeatable solution to a program flow that can be modified from the sequence produced by the executable file. It would further be desirable to provide such an alternative that provides ready comprehension of the code being changed by reference to high-level program code so that the sequence of commands can be modified without the user having the entire program source. It would further be desirable to provide such a system and method that provide a record of commands entered at a command line interface.